home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr48 / tsbat146.zip / BOOT.BAT < prev    next >
DOS Batch File  |  1993-01-19  |  3KB  |  106 lines

  1. echo off
  2. echo.
  3. echo ┌─────────────────────────────────────────────────┐
  4. echo │ Choose the boot configuration for the next boot │
  5. echo │ By Prof. Timo Salmi, ts@uwasa.fi, Tue 15-Sep-92 │
  6. echo └─────────────────────────────────────────────────┘
  7. echo.
  8.  
  9. rem Put a line with the word "Description:" into your alternative
  10. rem autoexec.bat files to show which boot is now on, E.g.
  11. rem Description: LastByte upper memory manager boot
  12.  
  13. rem Prevent accidental booting with a program from TSTSR*.ZIP
  14. rem Also needs mark-release from Turbo Power TSRCOM*.ZIP
  15. if not exist c:\tuki\noboot.exe goto _checkpar
  16. mark bootd > nul
  17. c:\tuki\noboot > nul
  18.  
  19. rem If no parameter give help, and show the current boot choice
  20. :_checkpar
  21. if "%1"=="" goto _help
  22.  
  23. rem Turn off the read-only attribute
  24. attrib -r c:\autoexec.bat
  25. attrib -r c:\config.sys
  26.  
  27. rem Choose the next boot
  28. for %%f in (1 2 3 4 5 6 7) do if "%1"=="%%f" goto _%%f
  29. echo Unknown option %1
  30. echo.
  31. goto :_help
  32.  
  33. :_1
  34. copy c:\confnorm.sys c:\config.sys > nul
  35. copy c:\autonorm.bat c:\autoexec.bat > nul
  36. goto _common
  37.  
  38. :_2
  39. copy c:\conftlb.sys c:\config.sys > nul
  40. copy c:\autotlb.bat c:\autoexec.bat > nul
  41. goto _common
  42.  
  43. :_3
  44. copy c:\confcd.sys c:\config.sys > nul
  45. copy c:\autocd.bat c:\autoexec.bat > nul
  46. goto _common
  47.  
  48. :_4
  49. copy c:\conftest.sys c:\config.sys > nul
  50. copy c:\autotest.bat c:\autoexec.bat > nul
  51. goto _common
  52.  
  53. :_5
  54. copy c:\confntsr.sys c:\config.sys > nul
  55. copy c:\autontsr.bat c:\autoexec.bat > nul
  56. goto _common
  57.  
  58. :_6
  59. copy c:\confansi.sys c:\config.sys > nul
  60. copy c:\autoansi.bat c:\autoexec.bat > nul
  61. goto _common
  62.  
  63. :_7
  64. copy c:\conftlb.sys c:\config.sys > nul
  65. copy c:\autoshld.bat c:\autoexec.bat > nul
  66. goto _common
  67.  
  68. rem Instructions to the user
  69. :_common
  70. set _return=_altcd
  71. goto _subru
  72. :_altcd
  73. echo.
  74. echo ALT-CTRL-DEL to boot
  75.  
  76. rem Turn on the read-only attribute for safety
  77. attrib +r c:\autoexec.bat
  78. attrib +r c:\config.sys
  79. goto :_out
  80.  
  81. rem Help for the user.  Customize as appropriate. If you have a number
  82. rem of options from mine, also edit the "for" statement earlier
  83. :_help
  84. echo Usage: BOOT [Choice]
  85. echo.
  86. echo 1 = My normal MsDos 3.3 boot
  87. echo 2 = LastByte upper memory manager boot
  88. echo 3 = CDROM boot
  89. echo 4 = Test configuration
  90. echo 5 = MsDos 3.3 boot with no TSRs loaded
  91. echo 6 = LastByte upper memory manager boot with ansi
  92. echo 7 = LastByte upper memory manager boot with vshield
  93. echo.
  94. set _return=_out
  95.  
  96. :_subru
  97. rem Batch subroutine to show which boot choice is the currently selected
  98. echo The current boot is
  99. find "Description:" c:\autoexec.bat
  100. goto %_return%
  101.  
  102. :_out
  103. set _return=
  104. if exist c:\tuki\noboot.exe release bootd > nul
  105. echo on
  106.